<?php
function smarty_function_seo($params, &$smarty)
{
	$strController	= isset($params['controller']) ? $params['controller'] : 'index';	
	$strAction		= isset($params['action']) ? $params['action'] : 'index';
	$intLanguage	= isset($params['lang']) ? $params['lang'] : LANGUAGE_VN;
	$arrRow			= isset($params['data']) ? $params['data'] : null;
	$objCommon		= new Ecore_Common();
	$objSeo			= $objCommon->getSeo($strController,$strAction,$intLanguage);
	$arrSeo			= null;	
	$smarty->assign('strController', $strController);
	$smarty->assign('strAction', $strAction);
	$smarty->assign('objSeo', $objSeo);
	$smarty->assign('objData', $arrRow);
	$smarty->assign('intLanguageForSeo', $intLanguage);
	$smarty->display(ROOT_DIR . '/library/Ecore/Plugins/Tpl/seo.tpl');
}
?>
